<template>
	<view>
		<view class="topcont">
			<view class="tit">{{ detail.njType }}</view>
			<view class="val">发布人：{{detail.contactNickname}}</view>
			<view class="listimg">
				<u--image width="702rpx" height="702rpx" :src="detail.pic">
					<template v-slot:loading>
						<u-loading-icon color="#39488a"></u-loading-icon>
					</template>
				</u--image>
			</view>
			<view class="mony" style="margin-top: 12rpx;display: flex;"><b>租金：</b><u--text mode="price" :text="detail.price" block color="red" style="width: auto;flex: inherit;margin-right: 8rpx;" bold></u--text>元/天</view>
			<view class="time" style="margin-top: 12rpx;display: flex;"><b>数量：</b><u--text :text="detail.num" block color="#8BB950" bold></u--text></view>
			<view class="time" style="font-weight: bold;padding: 12rpx 0;" v-if="detail.startTime"><b>可租赁时间：</b>{{ detail.startTime.substring(0, 10) }}-{{ detail.endTime.substring(0, 10) }}</view>
			<view class="time"><b>联系人：</b>{{ detail.contactNickname}}</view>
			<view class="time" style="font-weight: bold;padding: 12rpx 0;display: flex;" @click="call_phone(detail.contactMobile)">联系电话：<u--text :text="detail.contactMobile"  color="#8BB950" bold></u--text></view>
			<view class="time"><b>发布时间：</b>{{ detail.createTime}}</view>
			<view class="info"><b>备注：</b>
				<u-parse :content="detail.remark"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
import { njzpfbget } from '@/api/index.js';
export default {
	data() {
		return {
			detail: [],
		};
	},
	onLoad(options) {
		this.get_zjzxget(options.id);
	},
	methods: {
		get_zjzxget(id) {
			njzpfbget({ id: id }).then((res) => {
				this.detail = res.data;
			});
		},
		call_phone(number){
			uni.makePhoneCall({
				phoneNumber: number 
			});
		},
	}
};
</script>

<style lang="scss">
.topcont {
	padding:24rpx;
	background-color: #fff;
	.tit {
		text-align: left;
		line-height: 40rpx;
		font-weight: bold;
		font-size: 32rpx;
	}
	.val {
		font-size: 24rpx;
		color: #626675;
		text-align: right;
	}
	.listimg{
		margin-top: 24rpx;
		width: 100%;
	}
	.time{
		font-size: 28rpx;
		line-height: 40rpx;
	}
	.info {
		font-size: 28rpx;
	}
}
.list {
	background-color: #fff;
	margin: 24rpx;
	padding: 24rpx;
	border-radius: 12rpx;
	.list-one {
		border-bottom: 2rpx solid #d8d8d8;
		padding-bottom: 24rpx;
		.bottm {
			height: 100rpx;
			line-height: 100rpx;
			.l {
				font-weight: bold;
			}
			.r {
				font-size: 26rpx;
				color: #848689;
			}
		}
		.info {
			padding: 0;
			font-size: 28rpx;
		}
	}
}
</style>